package com.miguo.bean;

import java.io.Serializable;

import org.json.JSONException;
import org.json.JSONObject;

public class AddressBean implements Serializable {
	
	private static final long serialVersionUID = 1L;

	private Long id;
	private String name;
	private Long parentid;
	private String pinyin;

	public AddressBean() {
	}

	public AddressBean(Long id, String name, Long parentid, String pinyin) {
		this.id = id;
		this.name = name;
		this.parentid = parentid;
		this.pinyin = pinyin;
	}
	
	public AddressBean(JSONObject json) throws JSONException {
		id = json.getLong("id");
		name = json.getString("name");
		parentid = json.getLong("parentid");
		pinyin = "";
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Long getParentid() {
		return parentid;
	}

	public void setParentid(Long parentid) {
		this.parentid = parentid;
	}

	public String getPinyin() {
		return pinyin;
	}

	public void setPinyin(String pinyin) {
		this.pinyin = pinyin;
	}

}
